<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 
<%@ include file="../mobileHeader_inc.jsp" %>

<title>生活圈首页</title>
<script type="text/javascript">
	$(document).on('pageinit', function () {
		loadMsg(1);
    
	});
	function loadMsg(page){
		currentPage = page;
		var create_Time;
		var msgId;
		$.ajax({
	        url: '${ctx}/mobile/getLostAndFound',
	        dataType: "json",
	        async: true,
	        success: function (result) {
	        	
	        	if(result.obj != null){
	        		var content = new Array();
	        		var  copy= new Array();
	        		
	        		for(var i=0;i<result.obj.length;i++){
	        			create_Time = formatDate(result.obj[i].releaseTime);
	        			msgId = result.obj[i].arcitleId;
	        			/*  content[i] = "<li> <div class='am-gallery-item'> <a href='/mobile/goLAFDetail' target='_self' class=''> <img src='"+result.obj[i].depIcon+"'  alt='远方 有一个地方 那里种有我们的梦想'/><h3 class='am-gallery-title'>"+result.obj[i].depName+"</h3><div class='am-gallery-desc'>"+create_Time+"</div></a></div> </li> ";*/
	        			content[i] = " <li class='am-g am-list-item-dated'> <a  target='_self' href='/mobile/goLAFDetail?id="+msgId+"' class='am-list-item-hd ' >"+result.obj[i].arcitleName+"</a><span class='am-list-date'>"+create_Time+"</span> </li>";
	        			copy[i]="<li class='am-g am-list-item-dated'> <a  target='_self' href='/mobile/goLAFDetail?id="+msgId+"' class='am-list-item-hd ' >"+result.obj[i].arcitleName+"</a><span class='am-list-date'>"+create_Time+"</span> </li>";

	        			if(i==3){
	        				break;
	        			}

		        	}
	        		$("#a").append("<div><!--二手市场--><div data-am-widget='list_news' class='am-list-news am-list-news-default' > <!--列表标题--> <div class='am-list-news-hd am-cf'> <!--带更多链接--> <a href='##' > <h2>表白墙 </h2><span class='am-list-news-more am-fr'>更多 &raquo;</span> </a> </div><div class='am-list-news-bd'><ul class='am-list'> "+copy.join(" ")+" </ul> </div> </div>  ");
	        		$("#b").append(" <!--失物招领--><div data-am-widget='list_news' class='am-list-news am-list-news-default' ><!--列表标题--> <div class='am-list-news-hd am-cf'><!--带更多链接--> <a href='##' ><h2>失物招领</h2> <span class='am-list-news-more am-fr'>更多 &raquo;</span> </a> </div><div class='am-list-news-bd'><ul class='am-list'>"+content.join(" ")+"</ul></div></div></div>");
	        	}
	        },
	        error: function (request, error) {
	        	$("#doc-scrollspy-wrapper").append("<div class='am-alert'> 暂时没有帮助信息哦 ！ </div>");
	        }
	        
	    });
	}
	//格式化日期
	function formatDate (strTime) {
	    var date = new Date(strTime);
	    return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds();
	}
</script>
  
</head>

<body>
<!-- 头部 --> 
<div>

</div>

<!-- 中间 --> 

	<!-- 头部的滚动图片 --> 
<div data-am-widget="slider" class="am-slider am-slider-d2" data-am-slider='{&quot;directionNav&quot;:false}' >
  <ul class="am-slides">
      <li>
        	<img src="http://s.amazeui.org/media/i/demos/bing-1.jpg">
          <div class="am-slider-desc"><div class="am-slider-content"><h2 class="am-slider-title">远方 有一个地方 那里种有我们的梦想</h2><p>内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内</p></div><a class="am-slider-more">了解更多</a></div>
         
      </li>
      <li>
        	<img src="http://s.amazeui.org/media/i/demos/bing-2.jpg">
          <div class="am-slider-desc"><div class="am-slider-content"><h2 class="am-slider-title">某天 也许会相遇 相遇在这个好地方</h2><p>内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内</p></div><a class="am-slider-more">了解更多</a></div>
         
      </li>
      <li>
        	<img src="http://s.amazeui.org/media/i/demos/bing-3.jpg">
          <div class="am-slider-desc"><div class="am-slider-content"><h2 class="am-slider-title">不要太担心 只因为我相信 终会走过这条遥远的道路</h2><p>内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内</p></div><a class="am-slider-more">了解更多</a></div>
         
      </li>
      <li>
        	<img src="http://s.amazeui.org/media/i/demos/bing-4.jpg">
          <div class="am-slider-desc"><div class="am-slider-content"><h2 class="am-slider-title">OH PARA PARADISE 是否那么重要 你是否那么地遥远</h2><p>内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内</p></div><a class="am-slider-more">了解更多</a></div>
         
      </li>
  </ul>
</div>

	<!-- 中间的最新推荐 --> 
<div class="case-nav">
<ul>
  <li>
    <div class="am-gallery-item">
      <a href="${ctx }/mobile/market" target="_self" class="case-nav-p">
        <img src="/mobile/images/icon/aa.png">
        <p>商品详情</p>
      </a>
    </div>
  </li>
	<li>
    <div class="am-gallery-item">
      <a data-am-modal="{target: '#my-popup'}" href="#" class="case-nav-p">
        <img src="/mobile/images/icon/bb.png">
        <p>公告消息</p>
      </a>
    </div>
  </li>
  <li>
    <div class="am-gallery-item">
      <a href="${ctx }/mobile/about" target="_self" class="case-nav-p">
        <img src="/mobile/images/icon/cc.png">
        <p>关于我们</p>
      </a>
    </div>
  </li>
  <li>
    <div class="am-gallery-item">
      <a href="${ctx }/mobile/help" target="_self" class="case-nav-p">
        <img src="/mobile/images/icon/dd.png">
        <p>帮助中心</p>
      </a>
    </div>
  </li>
   
</ul>
</div>

<!-- 底部 --> 
<div data-am-widget="navbar" class="am-navbar  am-navbar-default gm-foot"   id="">
		<ul class="am-navbar-nav am-cf am-avg-sm-4">
		<li ><a><span class="am-icon-home"></span> <span class="am-navbar-label">生活圈</span> </a></li>
		<li> <a href="/mobile/goschoolLive" target="_self"  class="curr"> <span class="am-icon-th-large"></span> <span class="am-navbar-label">校园生活</span> </a> </li>
		<li > <a href="/mobile/goPerson" target="_self" class="curr"> <span class="am-icon-user"></span> <span class="am-navbar-label">我的</span> </a> </li>
		</ul> 
</div>
</body>
<html>